﻿using ConsoleApplication1.Forms;
using ConsoleApplication1.Forms.Cliente;
using ConsoleApplication1.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ConsoleApplication1
{
    static class Program
    {
        static void ThreadProc()
        {
            ViewCliente.Run(new ViewCliente());
        }
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Principal vc = new Principal();
            vc.StartPosition = FormStartPosition.CenterScreen;
            vc.FormBorderStyle = FormBorderStyle.FixedDialog;
            //Relogio rel = new Relogio();
            //Thread horas = new Thread(new ThreadStart(rel.atualizaHora));
            //horas.Start();
            Application.Run(vc);
            
            //using (MyTestModelContainer m = new MyTestModelContainer())
            //{
            //    if (m.Database.Exists() == true)
            //    {
            //        m.Database.Delete();
            //    }
            //    m.Database.CreateIfNotExists();
                
            //    //Pessoa p1 = new Pessoa() {Nome = "Josué 2", Idade = 16 };
            //    //Pessoa p2 = new Pessoa() {Nome = "Kiko 2", Idade = 50 };
            //    //m.PessoaSet.Add(p1);
            //    //m.PessoaSet.Add(p2);
            //    //m.SaveChanges();
            //    ////var list =  (from p in m.PessoaSet  orderby p.Idade).All;
            //    //foreach (Pessoa p in m.PessoaSet)
            //    //{
            //    //    Console.WriteLine(p.Id + " " + p.Nome);
            //    //}
                
            //}
        }
    }
}
